<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"
	import="com.imooc.bean.*,com.imooc.db.*"%>
<html>
<head>
<title>登录页面</title>
</head>
<body>
	这是页面登录程序
	<hr />
	<%
		//从表单中获取account和password并封装到Emp的实例中
		String account = request.getParameter("account");
		String password = request.getParameter("password");
		Emp emp = new Emp(account, null, password, null);
	%>

	<%
		boolean flag = DBUtil.selectEmpByAccountAndPassword(emp);
		if(flag){
			%>
			<table align="left">
		<tr>
			<td>账号</td>
			<td>姓名</td>
			<td>邮箱</td>
		</tr>
		<%
			for (String key : map.keySet()) {
					Emp m = map.get(key);
		%>

		<tr>
			<td><%=m.getAccount()%></td>
			<td><%=m.getName()%></td>
			<td><%=m.getEmil()%>></td>
		</tr>
		<%
			}
		}
		else{
	%>
	<a href="logon.jsp">用户名密码错误，请重试</a>	
	<%	
		}
		%>
</body>
</html>